home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
A.C.E. 2
/
ACE CD 2.iso
/
FILES
/
DOCS
/
AMOSDOC.LHA
/
AmosCommands.doc
< prev
next >
Wrap
Text File
|
1994-11-27
|
9KB
|
665 lines
AMOS COMMANDS LIST
Typed in by ???. Edited by PARASITE.
STRING FUNCTIONS
d$=LEFT$(s$,n)
LEFT$(d$,n)=s$
d$=MID$(s$,p,n)
MID$(d$,p,n)=s$
f=INSTR(d$,s$[,p])
s$=UPPER$(n$)
f$=FLIP$(s$)
s$=SPACE$(n)
s$=STRING$(a$,n)
s$=CHR$(n)
n=ASC(a$)
l=LEN(a$)
v=VAL(a$)
v#=VAL(a$)
s$=STR$(n)
MATHS
DEGREE / RADIAN
a#=PI#
s#=SIN(a)
s#=SIN(a#)
=COS
=TAN
=ACOS
=ATAN
=HSIN
=HCOS
=HTAN
=LOG
=EXP
=LN
=SQR
=ABS
=INT
=SGN
=RND
RANDOMIZE seed
r=MAX(x,y) / (x#,y#) / (x$,y$)
=MIN
SWAP x,y / x#,y# / x$,y$
FIX n
DEF FN name [(list)]=exp
FN name[(list)]
INC var
DEC var
ADD v,exp[base TO top]
ARRAY OPERATIONS
SORT a(0)
SORT a#(0)
SORT a$(0)
r=MATCH(t(0),s)
r=MATCH(t#(0),s#)
r=MATCH(t$(0),s$)
CONTROL STRUCTURES ETC
GOTO
GOSUB / RETURN
POP
IF...THEN...[ELSE]
IF...[ELSE]...ENDIF
FOR...NEXT
WHILE...WEND
REPEAT...UNTIL
DO...LOOP
EXIT [n]
EXIT IF exp[,n]
EDIT / DIRECT / END
ON v PROC p1,p2,p3......
ON v GOTO l1,l2,l3......
ON v GOSUB s1,s2,s3.....
EVERY n GOSUB sub
EVERY n PROC pro
EVERY ON/OFF
BREAK ON/OFF
ON ERROR GOTO n
ON ERROR PROC p
RESUME
e=ERRN
ERROR n
PROC name[list]
END PROC [expr]
SHARED var list
GLOBAL var list
PARAM
POP PROC
MEMORY BANKS
RESERVE AS type,bank,len
WORK
CHIP WORK
DATA
CHIP DATA
LISTBANK
ERASE b
s=START(b)
l=LENGTH(b)
LOAD f$[,n]
SAVE f$[,n]
BSAVE f$ start TO end
BLOAD f$,addr
SET BUFFER n
n=FREE
GRAPHICS
Colours
INK col[,paper][,border]
COLOUR index,$RGB
x=COLOUR(index)
PALETTE $nnn[,$nnn][,$nnn]......
Drawing
R LOCATE x,y
x=XGR
y=YGR
PLOT x,y[,col]
c=POINT(x,y)
DRAW x1,y1 TO x2,y2
BOX x1,y1 TO x2,y2
POLYLINE [TO] x1,y1 TO x2,y2 [TO]......
CIRCLE x,y,r
ELLIPSE x,y,r1,r2
SET LINE mask
PAINT x,y,mode
BAR x1,y1 TO x2,y2
POLYGON [TO] x1,y1 TO x2,y2 [TO]......
SET PATTERN pattern
SET PAINT n
GR WRITING bitpattern
CLIP [x1,y1 TO x2,y2]
SET TEMPRAS [adderess,size]
TEXT
PEN index
a$=PEN$(n)
PAPER index
x$=PAPER$(n)
INVERSE ON/OFF
SHADE ON/OFF
UNDER ON/OFF
WRITING w1[,w2]
LOCATE [X],[Y]
CMOVE w,h
x$=AT(x,y)
t=XTEXT(x)
t=YTEXT(y)
g=XGRAPHIC(x)
g=YGRAPHIC(y)
HOME
CDOWN
x$=CDOWN$
CUP
x$=CUP$
CLEFT
x$=CLEFT$
CRIGHT
x$=CRIGHT$
x=XCURS
y=YCURS
SET CURS b1,b2,b3....b8
CURS ON/OFF
MEMORIZE X
MEMORIZE Y
REMEMBER X
REMEMBER Y
CLINE [n]
CURS PEN n
CENTRE a$
x$=TAB$
SET TAB n
x$=REPEAT$(a$,n)
x$=ZONE$(a$,n)
x$=BORDER$(a$,n)
HSCROLL n
VSCROLL n
TEXT x,y,a$
GET FONTS
GET DISK FONTS
GET ROM FONTS
a$=FONTS(n)
SET FONT n
SET TEXT style
s=TEXT STYLE
w=TEXT LENGTH(t$)
b=TEXT BASE
WINDOWS
WINDOPEN n,x,y,w,h[,border[,set]]
WINDOW FONT n
WINDSAVE
BORDER n,paper,pen
TITLE TOP t$
TITLE BOTTOM t$
WINDOW n
n=WINDON
WIND CLOSE
WIND MOVE x,y
WINDSIZE sx,sy
CLW
Slider bars
HSLIDER x1,y1 TO x2,y2,total,pos,size
VSLIDER x1,y1 TO x2,y2,total,pos,size
SET SLIDER b1,b2,b3,pb,s1,s2,s3,ps
SCREENS
SCREEN OPEN n,w,h,nc,mode
SCREEN CLOSE n
AUTO VIEW ON/OFF
DEFAULT
VIEW
LOAD IFF filename$[,screen]
SAVE IFF filename$[,compression]
SCREEN DISPLAY n[,x,y,w,h]
SCREEN OFFSET n,x,y
SCREEN CLONE n
DUAL PLAYFIELD screen1,screen2
DUAL PRIORITY screen1,screen2
SCREEN n
s=SCREEN
SCREEN TO FRONT [s]
SCREEN TO BACK [n]
SCREEN HIDE [n]
SCREEN SHOW [n]
h=SCREEN HEIGHT [n]
w=SCREEN WIDTH [n]
c=SCREEN COLOUR
s=SCIN(x,y)
SPACK s TO n [tx,ty,bx,by]
PACK s TO n [tx,ty,bx,by]
UNPACK b TO s
Screen colours
DEFAULT PALETTE c1,c2,c3.......up to c32
GET PALETTE n[,mask]
CLS [col][,x1,y1 TO x2,y2]
SCREEN COPY scr1 TO scr2
SCREEN COPY scr1,x1,y1 TO scr2,x3,y3[,mode]
DEF SCROLL n,x1,y1 TO x2,y2,dx,dy
SCROLL n
SREEN SWAP [n]
addr=LOGBASE(plane)
addr=PHYBASE(plane)
s=PHYSIC[(s)]
l=LOGIC[(s)]
WAIT VBL
APPEAR source TO dest,effect[,pixels]
FADE speed[,colour list]
FADE speed TO screen[,mask]
FLASH index,"(col,delay)(col,delay)......"
FLASH OFF
SHIFT UP delay,first,last,flag
SHIFT DOWN delay,first,last,flag
SHIFT OFF
SET RAINBOW n,col,length,r$,g$,b$
RAINBOW n,base,y,h
c=RAIN(n,line)
ZOOM source,x1,y1,x2,y2 TO dest,x3,y3,x4,y4
Copper list
COPPER OFF/ON
COP MOVE addr,value
COP MOVEL addr,value
COP WAIT x,y[,x mask ,y mask]
COP RESET
addr=COP LOGIC
HARDWARE SPRITES
SPRITE n,x,y,i
GET SPRITE PALETTE [mask]
SET SPRITE BUFFER n
SPRITE OFF [n]
SPRITE UPDATE [ON/OFF]
x=X SPRITE(n)
y=Y SPRITE(n)
GET SPRITE [s,]i,x1,y1 TO x2,y2
Conversion functions
x=X SCREEN([n,]xcoord)
y=Y SCREEN([n,]ycoord)
x=X HARD ([n,]xcoord)
y=Y HARD ([n,]ycoord)
image=I SPRITE(n)
BLITTER OBJECTS
BOB n,x,y,i
DOUBLE BUFFER
SET BOB n,back,planes,minterms
NO MASK [n]
AUTOBACK n
BOB UPDATE [ON/OFF]
BOB CLEAR
BOB DRAW
x1=X BOB(n)
y1=Y BOB(n)
image=I BOB(n)
LIMIT BOB [n,]x1,y1 TO x2,y2
GET BOB [s,]i,x1,y1 TOx2,y2
PUT BOB n
PASTE BOB x,y,i
BOB OFF [n]
PRIORITY ON/OFF
UPDATE ON/OFF
OBJECT CONTROL
HIDE [ON]
SHOW [ON]
CHANGE MOUSE m
k=MOUSE KEY
c=MOUSE CLICK
=X MOUSE=
=Y MOUSE=
LIMIT MOUSE x1,y1 TO x2,y2
d=JOY(j)
j=JLEFT(j)
j=JRIGHT(j)
j=JUP(j)
j=JDOWN(j)
f=FIRE(j)
Detecting Collisions
c=SPRITE COL(n[,s TO e])
c=BOB COL(n[,s TO e])
c=SPRITEBOB COL (n[,s TO e])
c=COL(n)
HOT SPOT image,x,y / image,p
MAKE MASK [n]
RESERVE ZONE [n]
SET ZONE z,x1,y1 TO x2,y2
t=ZONE([s,]x,y)
t=HZONE([s,]x,y)
x=MOUSE ZONE
RESET ZONE [z]
PRIORITY ON/OFF
UPDATE ON/OFF
AMAL COMMANDS
Move deltax,deltay,steps
Anim cycles,(image,delay)(image,delay)..
Let Reg=exp
Jump L
If exp Jump L
For Reg=start TO end..
Next Reg
PLay path
AUtotest (list)
eXit
Wait
On
Direct
Amal functions
=XM =YM
=K1 =K2
=J0 =J1
=Z(n)
=XH(s,x) =YH(s,y)
=XS(s,x) =YS(s,y)
=BC(n,s,e) =SC(m,s,e)
=C(v) =V(v)
Amal from Basic
AMAL ON/OFF [n]
AMAL FREEZE [n]
r=AMREG(n[,chan])
AMREG(n[,chan])=exp
AMPLAY tempo,dir[,s TO e]
s=CHANAN(chan)
s=CHANMV(chan)
CHANNEL n TO object s
SPRITE
BOB
SCREEN DISPLAY
SCREEN OFFSET
SCREEN SIZE
RAINBOW
UPDATE EVERY n
SYNCHRO [ON/OFF]
BACKGROUND GRAPHICS
Icons
PASTE ICON x,y,n
GET ICON [s,]i,tx,ty TO bx,by
GET ICON PALETTE
DEL ICON n [TO m]
MAKE ICON MASK [n]
Screen blocks
GET BLOCK n,tx,ty,w,h[,mask]
PUT BLOCK n[,x,y]
PUT BLOCK n,x,y,planes[,mterm]
DEL BLOCK n
GET CBLOCK n,x,y,sx,sy
PUT CBLOCK n[,x,y]
DEL CBLOCK [n]
MENUS
MENU$(n)=title$
MENU$(t,o)=option$
MENU ON [bank]
MENU OFF
MENU DEL(,,)
MENU TO BANK (n)
BANK TO MENU (n)
ch=CHOICE[(1/2)]
MENU$(,,)=normal$[sel$][,inac$][,bg$]
ON MENU PROC p1[,p2][,p3]...
ON MENU GOSUB/GOTO g1[,g2]...
ON MENU ON/OFF
ON MENU DEL
MENU KEY(,,) TO c$
MENU KEY(,,) TO scan[,shift]
MENU CALC
MENU CALLED(,,)
MENU ONCE(,,)
Embedded commands
Ob n
ICon n
LOcate x,y
INk n,val
SFont n
SStyle n
LIne x,y
SLine p
BAr x,y
PAttern n
OUtline flag
ELlipse r1,r2
PRoc name
REserve n
Alternative styles
MENU LINE level / (,,)
MENU TLINE level / (,,)
MENU BAR level / (,,)
MENU INACTIVE level / (,,)
MENU ACTIVE level / (,,)
Moveable menus
MENU MOVABLE level / (,,)
MENU STATIC level / (,,)
MENU ITEM MOVABLE level / (,,)
MENU ITEM STATIC level / (,,)
MENU SEPARATE level / (,,)
MENU LINKED level / (,,)
x=MENU X(,,)
x=MENU Y(,,)
MENU BASE x,y
SET MENU (,,) TO x,y
MENU MOUSE ON/OFF
SOUND AND MUSIC
BOOM, SHOOT, BELL
VOLUME [v,]intensity
SAM PLAY [v,]s[,f]
SAM BANK n
SAM RAW v,a,l,f
SAM LOOP ON/OFF
MUSIC n
MUSIC STOP
MUSIC OFF
TEMPO s
MVOLUME n
VOICE mask
s=VUMETER(v)
SET WAVE wave,shape$
WAVE w TO v
NOISE TO voices
DEL WAVE n
SAMPLE n TO voices
SET ENVEL w,p TO d,v
SAY t$[,mode]
SET TALK s,m,p,r
LED ON/OFF
THE KEYBOARD
k$=INKEY$
s=SCANCODE
t=KEY STATE(s)
keys=KEY SHIFT
x$=INPUT$(n)
WAIT KEY
KEY SPEED lag,speed
CLEAR KEY
PUT KEY a$
INPUT
LINE INPUT
OTHER COMMANDS
DIM v(a,b,c...)
PRINT, ?
PRINT USING
REM, '
DATA, READ, RESTORE
WAIT n
=TIMER=
a=NOT(d)
v=TRUE
v=FALSE
DISK ACCESS
DIR[path$][/w]
=DIR$=
PARENT
SET DIR n[,filter$]
f=DFREE
MKDIR f$
KILL f$
RENAME old$ TO new$
f$=FSEL$(path$[,def$][,t1$,t2$])
RUN f$
f=EXIST(f$)
f$=DIR FIRST$(path$)
f$=DIR NEXT$
Sequential files
OPEN OUT ch,n$
APPEND ch,n$
OPEN IN ch,n$
CLOSE n
PRINT#ch,var list
INPUT#ch,var list
LINE INPUT#ch,var list
LINE INPUT#ch,sep,var list
SET INPUT c1,c2
=INPUT$(f,count)
=EOF(ch)
=LOF(ch)
=POF(ch)
Random access files
OPEN RANDOM ch,n$
FIELD ch,len1 AS f1$, len2 AS f2$....
PUT ch,r
GET ch,r
Other devices
LLIST
LPRINT
LDIR
OPEN PORT ch, "PAR:"
"SER:"
"PRT:"
n=PORT(ch)
MACHINE CODE
=HEX$(v) =HEX$(v,n)
=BIN$(v) =BIN$(v,n)
=PEEK(a) POKE a,v
=DEEK(a) DOKE a,v
=LEEK(a) LOKE a,v
=VARPTR(var)
COPY st,fin TO dest
FILL st TO fin,pat
=HUNT(st TO fin,s$)
Bitwise operators
ROL.B, ROL.W, ROL.L n,v
ROR.B, ROR.W, ROR.L n,v
=BTST(n,v)
=BSET n,v
BCHG n,v
BCLR n,v
Using ASM
PLOAD f$,bank
CALL addr[,params]
CALL bank[,params]
=AREG=
=DREG=
System libraries
=DOSCALL(func)
=EXECALL(func)
=GFXCALL(func)
=INTCALL(func)
Inside AMOS
=SCREEN BASE
=SPRITE BASE(n)
=ICON BASE(n)
End.